<template>
  <div class="lastProfits votesTotal">
    <div class="details">
      <el-table
        :data="tableData"
        style="width: 100%"
        class="table">
        <!-- 代理账号 -->
        <el-table-column
          prop="proxyName"
          :label="$t('newpos.agencyAccount')">
        </el-table-column>
        <!-- 代理票数 -->
        <el-table-column
          prop="proxyVotes"
          :label="$t('newpos.proxyVotes')">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>

export default {
  name: 'votesTotal', // 挖矿总量
  data() {
    return {
      tableData: []
    }
  },
  components: {},
  props: {
    votesTotalVisible: {
      type: Boolean,
      default: false
    },
    proxyVotesInfos: Array
  },
  watch: {
    votesTotalVisible: function change(val) {
      if (val) {
        this.handleProxyVotesInfos();
      }
    },
    proxyVotesInfos: function change() {
      this.handleProxyVotesInfos()
    },
  },
  computed: {},
  created() {},
  mounted() {
    this.handleProxyVotesInfos()
  },
  beforeDestroy() {},
  methods: {
    handleProxyVotesInfos() {
      const val = this.proxyVotesInfos;
      this.tableData = [];
      this.tableData.push(...val);
    }
  },
}
</script>
<style lang="scss" scoped>
@import '@/views/newpos/public.scss';
/deep/ .table {
  .el-table__body-wrapper {
    overflow-y: auto;
    max-height: 365px;
    &::-webkit-scrollbar {
      width: 5px;
      height: 5px;
      background-color: #f1f1f1;
    }
    /*定义滚动条的轨道，内阴影及圆角*/
    &::-webkit-scrollbar-track {
      -webkit-box-shadow: inset 0 0 0 #f1f1f1;
      border-radius: 0;
      background-color: #f1f1f1;
    }
    /*定义滑块，内阴影及圆角*/
    &::-webkit-scrollbar-thumb {
      /*width: 10px;*/
      /*height: 25px;*/
      border-radius: 1px;
      -webkit-box-shadow: inset 0 0 0 #c1c1c1;
      background-color: rgba(193, 193, 193, 0.7);
    }
  }
}

.theme-1B1D27 {
  .table {
    /deep/ .el-table__body-wrapper {
      &::-webkit-scrollbar {
        background-color: rgba(0, 0, 0, 0) !important;
      }
      /*定义滚动条的轨道，内阴影及圆角*/
      &::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0) !important;
        background-color: rgba(0, 0, 0, 0) !important;
      }
      /*定义滑块，内阴影及圆角*/
      &::-webkit-scrollbar-thumb {
        /*width: 10px;*/
        /*height: 25px;*/
        -webkit-box-shadow: inset 0 0 0 rgba(0, 0, 0, .5) !important;
        background-color: rgba(0, 0, 0, .5) !important;
      }
    }
  }
}
</style>

